<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    用户名<input type="text" class="user"> <br>
    密码<input type="text" class="pwd"> <br>
    手机号<input type="text" class="phone"> <br>
    邮箱<input type="text" class="email"> <br>
    <button>注册</button>



    <script>



        const oUser = document.querySelector('.user');
        const oPwd = document.querySelector('.pwd');
        const oBtn = document.querySelector('button');


        // 参数必须是字符串   
        localStorage.setItem('yy', { a: 1, b: 2 });


        // 了解  [object Object]   对象转成了字符串  obj   arr.join()


        const obj = { a: 1, b: 2 };
        document.write(obj);   // [object Object]
        // console.log(obj.toString())

        // 数组在转化的时候  join 方法
        console.log(String(['a', 'b']))
        console.log(obj);


        const arr = [3, 4, 5];
        document.write(arr);

    </script>

</body>

</html>